package com.yurun.accountservice.service;

import com.yurun.accountservice.mapper.AccountMapper;
import com.yurun.accountservice.tcc.AccountActionService;
import com.yurun.accountservice.tcc.AccountActionServiceImpl;
import io.seata.rm.tcc.api.BusinessActionContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Xi Gao
 * @date 2020/9/2 16:50
 */
@Slf4j
@Service
public class AccountService {

/*    @Resource
    private AccountMapper accountMapper;*/

    @Resource
    private AccountActionService accountActionService;

    public boolean reducerAccountMoney(String userId, Integer money) {
        return accountActionService.reducerAccountMoney(null, userId, money);
    }

}